<template>
  <div v-if="data !== null">
    <div class="title">专辑介绍</div>
    <div class="content">{{ data.description }}</div>
  </div>
</template>

<script>
import { mapState, mapMutations, mapActions } from 'vuex';

export default {
  computed: {
    ...mapState(['albumData']), // 读取VUEX中的状态
  },
  mounted() {
    this.data = null
    this.data = this.albumData.albumData.album;
  },
  beforeRouteLeave(to, from, next) {
    this.data = null
    next()
  },
  data() {
    return {
      data: null,
    };
  },
};
</script>

<style scoped>
.title {
  font-size: 24px;
  margin-bottom: 5px;
}

.content {
  font-size: 20px;
  margin-bottom: 40px;
  line-height: 40px;
}
</style>
